import request from '@/utils/request'

// 查询货品存储出库列表
export function listOut(query) {
  return request({
    url: '/system/out/list',
    method: 'get',
    params: query
  })
}

// 查询货品存储出库详细
export function getOut(id) {
  return request({
    url: '/system/out/' + id,
    method: 'get'
  })
}

// 新增货品存储出库
export function addOut(data) {
  return request({
    url: '/system/out',
    method: 'post',
    data: data
  })
}

// 修改货品存储出库
export function updateOut(data) {
  return request({
    url: '/system/out',
    method: 'put',
    data: data
  })
}

// 删除货品存储出库
export function delOut(id) {
  return request({
    url: '/system/out/' + id,
    method: 'delete'
  })
}

// 导出货品存储出库
export function exportOut(query) {
  return request({
    url: '/system/out/export',
    method: 'get',
    params: query
  })
}

// 货品类型分类
export function getGoodsStyle(data) {
  return request({
    url: `/system/cate/queryProductByMaterialCate`,
    method: `post`,
    data
  })
}

// 获取库存数量
export function getGoodsNum(query) {
  console.log(`data============:`,query)
  return request({ url: `/system/storage/queryProductStorage`, method: `get`, params: query})
}
